import java.util.Scanner ;
//https://ac.nowcoder.com/acm/problem/221681
public class MainNC221681{
    public static void main(String[] args){
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int target = scan.nextInt() ;
        int[] arr = new int[n+1] ;
        for(int i=1 ; i <= n ; i ++){
            arr[i] = scan.nextInt() ;
        }
        int sum = 0 ;
        int len = n+1 ;
        int left = 1 ,right = 1 ;
        for(int i=1 ,j=1 ; j <= n && i<= n ; j++){
            // 进窗口
            sum += arr[j] ;
            // 出窗口
            while(i <= n && sum >= target){
                if(len > j-i+1){
                    len = j-i+1;
                    left = i ;
                    right = j ;
                }
                sum -= arr[i] ;
                i ++ ;
            }
        }
        System.out.println(left + " "+right);

    }
    
    
}